package com.neusoft.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Options;
import org.apache.ibatis.annotations.Select;

import com.neusoft.po.OrderDetailet;

@Mapper
public interface OrderDetailetMapper {

	@Insert("insert into orderdetailet(orderId,foodId,quantity) values(#{orderId},#{foodId},#{quantity})")
	@Options(useGeneratedKeys=true,keyProperty="odId",keyColumn="odId")
	public int saveOrderDetailetBatch(OrderDetailet od);
	
	@Select("select * from orderdetailet where orderId=#{orderId} order by odId")
	public List<OrderDetailet> listOrderDetailetByOrderId(Integer orderId);
}
